package com.dog.basics.service.common;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dog.basics.bean.dto.admin.common.ArticleAddDto;
import com.dog.basics.bean.dto.admin.common.ArticleEditDto;
import com.dog.basics.bean.dto.admin.common.ArticleFormDto;
import com.dog.basics.bean.model.common.DogComArticle;
import com.dog.basics.bean.vo.admin.common.PcArticleVo;
import com.dog.basics.bean.vo.api.common.ApiArticleVo;
import com.dog.basics.common.util.PageParam;

/**
 * <p>
 * CMS文章表 服务类
 * </p>
 *
 * @author guonh
 * @since 2020-05-20
 */
public interface IDogComArticleService extends IService<DogComArticle> {

    /**
     * @Description: 增加CMS文章
     * @Param:
     * @return: Boolean
     * @Author: zhangrm
     * @Date: 2020/05/22  0027
     */
    Boolean saveObj(ArticleAddDto obj);

    /**
     * @Description: 删除CMS文章
     * @Param: ids
     * @return: Boolean
     * @Author: zhangrm
     * @Date: 2020/05/22  0027
     */
    Boolean deleteObj(Long id);

    /**
     * @Description: 修改CMS文章
     * @Param:
     * @return: Boolean
     * @Author: zhangrm
     * @Date: 2020/05/22  0027
     */
    Boolean editObj(ArticleEditDto obj);

    /**
     * @Description: 分页CMS文章列表
     * @Param:
     * @return:
     * @Author: zhangmr
     * @Date:
     */
    IPage<PcArticleVo> getPageList(PageParam page, ArticleFormDto obj);


    /**
     * @Description: 分页cms文章列表API
     * @Param:
     * @return:
     * @Author: zhangmr
     * @Date:
     */
    IPage<ApiArticleVo> getPageListApi(PageParam page, com.dog.basics.bean.dto.api.common.ArticleFormDto obj);


    /**
     * @Description: 增加cms文章点击量或分享数
     * @Param:
     * @return: Boolean
     * @Author: zhangrm
     * @Date: 2020/05/22  0027
     */
    Boolean addedit(Integer flag, Long articleId);

    /**
    * @Description CMS文章回收
    * @Author  zhangmr
    * @Date   2020/7/20 0020 下午 16:00
    * @Param
    * @Return
    * @Exception
    *
    */
    Boolean back(Long id);

    /**
    * @Description CMS文章审核
    * @Author  zhangmr
    * @Date   2020/7/20 0020 下午 16:08
    * @Param
    * @Return
    * @Exception
    *
    */
    Boolean examine(Long id, Integer status);
}
